﻿using System.Collections.Generic;

namespace ACE
{
    public class Metric
    {
        //<?xml version = "1.0" ?>
        //<metric - datas >
        //  <metric - data >
        //    <metricId>9905925</metricId>
        //    <metricPath>Overall Application Performance|Calls per Minute</metricPath>
        //    <metricName>BTM|Application Summary|Calls per Minute</metricName>
        //    <frequency>SIXTY_MIN</frequency>
        //    <metricValues>
        //      <metric-value>
        //        <startTimeInMillis>1448488800000</startTimeInMillis>
        //        <value>35</value>
        //        <min>0</min>
        //        <max>0</max>
        //        <current>0</current>
        //        <sum>14127</sum>
        //        <count>575</count>
        //        <standardDeviation>0.0</standardDeviation>
        //        <occurrences>0</occurrences>
        //        <useRange>false</useRange>
        //      </metric-value>
        //    </metricValues>
        //  </metric-data>
        //</metric-datas>

        public string MetricId { get; internal set; }
        public string MetricPath { get; internal set; }
        public string MetricName { get; internal set; }
        public string Frequency { get; internal set; }
        public List<MetricValue> MetricValues { get; internal set; }
        public Metric(string metricId, string metricPath, string metricName, string frequency, List<MetricValue> metricValues)
        {
            MetricId = metricId;
            MetricPath = metricPath;
            MetricName = metricName;
            Frequency = frequency;
            MetricValues = metricValues;
        }

    }

    public class MetricValue
    {
        public string StartTimeInMillis { get; internal set; }
        public string Value { get; internal set; }
        public string Min { get; internal set; }
        public string Max { get; internal set; }
        public string Current { get; internal set; }
        public string Sum { get; internal set; }
        public string Count { get; internal set; }
        public string StandardDeviation { get; internal set; }
        public string Occurrences { get; internal set; }
        public string UseRange { get; internal set; }
        public MetricValue(string startTimeInMillis, string value, string min, string max, string current, string sum, string count, string standardDeviation, string occurrences, string useRange)
        {
            StartTimeInMillis = startTimeInMillis;
            Value = value;
            Min = min;
            Max = max;
            Current = current;
            Sum = sum;
            Count = count;
            StandardDeviation = standardDeviation;
            Occurrences = occurrences;
            UseRange = useRange;
        }
    }
}